import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
    history: createWebHashHistory(), // hash模式：createWebHashHistory，history模式：createWebHistory
    routes: [{
            path: '/',
            redirect: '/swiper'
        },

        {
            path: '/dashboard',
            name: 'dashboard',
            component: () =>
                import ( /* webpackChunkName: "dashboard" */ '../views/Index.vue')
        },
        {
            path: '/login',
            name: 'login',
            component: () =>
                import ( /* webpackChunkName: "login" */ '../views/Login.vue')
        },
        {
            path: '/add',
            name: 'add',
            component: () =>
                import ( /* webpackChunkName: "add" */ '../views/AddGood.vue')
        },
        {
            path: '/addconsultation',
            name: 'addconsultation',
            component: () =>
                import ( /* webpackChunkName: "addconsultation" */ '../views/AddConsultation.vue')
        },

        {
            path: '/swiper',
            name: 'swiper',
            component: () =>
                import ( /* webpackChunkName: "swiper" */ '../views/Swiper.vue')
        },
        {
            path: '/hot',
            name: 'hot',
            component: () =>
                import ( /* webpackChunkName: "hot" */ '../views/IndexConfig.vue')
        },
        {
            path: '/new',
            name: 'new',
            component: () =>
                import ( /* webpackChunkName: "new" */ '../views/IndexConfig.vue')
        },
        {
            path: '/recommend',
            name: 'recommend',
            component: () =>
                import ( /* webpackChunkName: "recommend" */ '../views/IndexConfig.vue')
        },
        {
            path: '/livesp',
            name: 'livesp',
            component: () =>
                import ( /* webpackChunkName: "livesp" */ '../views/Livesp.vue')
        },
        {
            path: '/addlivesp',
            name: 'addlivesp',
            component: () =>
                import ( /* webpackChunkName: "addlivesp" */ '../views/AddLivesp.vue')
        },
        {
            path: '/category',
            name: 'category',
            component: () =>
                import ( /* webpackChunkName: "category" */ '../views/Category.vue'),
            children: [{
                    path: '/category/level2',
                    name: 'level2',
                    component: () =>
                        import ( /* webpackChunkName: "level2" */ '../views/Category.vue'),
                },
                {
                    path: '/category/level3',
                    name: 'level3',
                    component: () =>
                        import ( /* webpackChunkName: "level3" */ '../views/Category.vue'),
                }
            ]
        },
        {
            path: '/good',
            name: 'good',
            component: () =>
                import ( /* webpackChunkName: "new" */ '../views/Good.vue')
        },
        {
            path: '/consultation',
            name: 'consultation',
            component: () =>
                import ( /* webpackChunkName: "new" */ '../views/Consultation.vue')
        },
        {
            path: '/guest',
            name: 'guest',
            component: () =>
                import ( /* webpackChunkName: "guest" */ '../views/Guest.vue')
        },
        {
            path: '/order',
            name: 'order',
            component: () =>
                import ( /* webpackChunkName: "order" */ '../views/Order.vue')
        },
        {
            path: '/order_detail',
            name: 'order_detail',
            component: () =>
                import ( /* webpackChunkName: "order_detail" */ '../views/OrderDetail.vue')
        },
        {
            path: '/account',
            name: 'account',
            component: () =>
                import ( /* webpackChunkName: "account" */ '../views/Account.vue')
        },
        {
            path: '/good_video',
            name: 'good_video',
            component: () =>
                import ( /* webpackChunkName: "account" */ '../views/GoodVideo.vue')
        },
        {
            path: '/add_video',
            name: 'add_video',
            component: () =>
                import ( /* webpackChunkName: "account" */ '../views/AddVideo.vue')
        },
        {
            path: '/appraisal',
            name: 'appraisal',
            component: () =>
                import ( /* webpackChunkName: "account" */ '../views/Appraisal.vue')
        },
        {
            path: '/add_appraisal',
            name: 'add_appraisal',
            component: () =>
                import ( /* webpackChunkName: "account" */ '../views/AddAppraisal.vue')
        },
        {
            path: '/appraisal_topic',
            name: 'appraisal_topic',
            component: () =>
                import ( /* webpackChunkName: "account" */ '../views/AppraisalTopic.vue')
        },
        {
            path: '/add_topic',
            name: 'add_topic',
            component: () =>
                import ( /* webpackChunkName: "account" */ '../views/AddTopic.vue')
        },
        {
            path: '/counselor',
            name: 'counselor',
            component: () =>
                import ( /* webpackChunkName: "account" */ '../views/Counselor.vue')
        },
        {
            path: '/add_counselor',
            name: 'add_counselor',
            component: () =>
                import ( /* webpackChunkName: "account" */ '../views/AddCounselor.vue')
        },
    ]
})

export default router